\documentclass[a4paper, spanish]{article}

\usepackage{caratula}
\usepackage[latin1]{inputenc}
\usepackage[spanish, activeacute]{babel}

\usepackage{amssymb,amsmath}
\usepackage{listings} 

\newcommand{\alt}{\:\big|\:}

\begin{document}
\input{caratula}
  
\input{gramatica}

\newpage
\input{implementacion}

\newpage
\input{pruebas}

\newpage

\appendix
\input{codigos}

\end{document}

